Hệ thống quản lý hàng tồn kho bằng PHP

1 <?php
2     session_start();
3     
// Redirect the user to login page if he is not logged in.
4     
if(!isset($_SESSION['loggedIn'])){
5         header(
'Location: login.php');
6         exit();
7     }
8     
9     require_once(
'inc/config/constants.php');
10     require_once(
'inc/config/db.php');
11     require_once(
'inc/header.html');
12 ?>
13   <body>
14 <?php
15     require
'inc/navigation.php';
16 ?>
17     <!-- Page Content -->
18     <div
class="container-fluid">
19       <div
class="row">
20         <div
class="col-lg-2">
21         <h1
class="my-4"></h1>
22             <div
class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
23               <a
class="nav-link active" id="v-pills-item-tab" data-toggle="pill" href="#v-pills-item" role="tab" aria-controls="v-pills-item" aria-selected="true">Item</a>
24               <a
class="nav-link" id="v-pills-purchase-tab" data-toggle="pill" href="#v-pills-purchase" role="tab" aria-controls="v-pills-purchase" aria-selected="false">Purchase</a>
25               <a
class="nav-link" id="v-pills-vendor-tab" data-toggle="pill" href="#v-pills-vendor" role="tab" aria-controls="v-pills-vendor" aria-selected="false">Vendor</a>
26               <a
class="nav-link" id="v-pills-sale-tab" data-toggle="pill" href="#v-pills-sale" role="tab" aria-controls="v-pills-sale" aria-selected="false">Sale</a>
27               <a
class="nav-link" id="v-pills-customer-tab" data-toggle="pill" href="#v-pills-customer" role="tab" aria-controls="v-pills-customer" aria-selected="false">Customer</a>
28               <a
class="nav-link" id="v-pills-search-tab" data-toggle="pill" href="#v-pills-search" role="tab" aria-controls="v-pills-search" aria-selected="false">Search</a>
29               <a
class="nav-link" id="v-pills-reports-tab" data-toggle="pill" href="#v-pills-reports" role="tab" aria-controls="v-pills-reports" aria-selected="false">Reports</a>
30             </div>
31         </div>
32          <div
class="col-lg-10">
33             <div
class="tab-content" id="v-pills-tabContent">
34               <div
class="tab-pane fade show active" id="v-pills-item" role="tabpanel" aria-labelledby="v-pills-item-tab">
35                 <div
class="card card-outline-secondary my-4">
36                   <div
class="card-header">Item Details</div>
37                   <div
class="card-body">
38                     <ul
class="nav nav-tabs" role="tablist">
39                         <li
class="nav-item">
40                             <a
class="nav-link active" data-toggle="tab" href="#itemDetailsTab">Item</a>
41                         </li>
42                         <li
class="nav-item">
43                             <a
class="nav-link" data-toggle="tab" href="#itemImageTab">Upload Image</a>
44                         </li>
45                     </ul>
46                     
47                     <!-- Tab panes
for item details and image sections -->
48                     <div
class="tab-content">
49                         <div id=
"itemDetailsTab" class="container-fluid tab-pane active">
50                             <br>
51                             <!-- Div to show the ajax message
from validations/db submission -->
52                             <div id=
"itemDetailsMessage"></div>
53                             <form>
54                               <div
class="form-row">
55                                 <div
class="form-group col-md-3" style="display:inline-block">
56                                   <label
for="itemDetailsItemNumber">Item Number<span class="requiredIcon">*</span></label>
57                                   <input type=
"text" class="form-control" name="itemDetailsItemNumber" id="itemDetailsItemNumber" autocomplete="off">
58                                   <div id=
"itemDetailsItemNumberSuggestionsDiv" class="customListDivWidth"></div>
59                                 </div>
60                                 <div
class="form-group col-md-3">
61                                   <label
for="itemDetailsProductID">Product ID</label>
62                                   <input
class="form-control invTooltip" type="number" readonly id="itemDetailsProductID" name="itemDetailsProductID" title="This will be auto-generated when you add a new item">
63                                 </div>
64                               </div>
65                               <div
class="form-row">
66                                   <div
class="form-group col-md-6">
67                                     <label
for="itemDetailsItemName">Item Name<span class="requiredIcon">*</span></label>
68                                     <input type=
"text" class="form-control" name="itemDetailsItemName" id="itemDetailsItemName" autocomplete="off">
69                                     <div id=
"itemDetailsItemNameSuggestionsDiv" class="customListDivWidth"></div>
70                                   </div>
71                                   <div
class="form-group col-md-2">
72                                     <label
for="itemDetailsStatus">Status</label>
73                                     <
select id="itemDetailsStatus" name="itemDetailsStatus" class="form-control chosenSelect">
74                                         <?php include(
'inc/statusList.html'); ?>
75                                     </
select>
76                                   </div>
77                               </div>
78                               <div
class="form-row">
79                                 <div
class="form-group col-md-6" style="display:inline-block">
80                                   <!-- <label
for="itemDetailsDescription">Description</label> -->
81                                   <textarea rows=
"4" class="form-control" placeholder="Description" name="itemDetailsDescription" id="itemDetailsDescription"></textarea>
82                                 </div>
83                               </div>
84                               <div
class="form-row">
85                                 <div
class="form-group col-md-3">
86                                   <label
for="itemDetailsDiscount">Discount %</label>
87                                   <input type=
"text" class="form-control" value="0" name="itemDetailsDiscount" id="itemDetailsDiscount">
88                                 </div>
89                                 <div
class="form-group col-md-3">
90                                   <label
for="itemDetailsQuantity">Quantity<span class="requiredIcon">*</span></label>
91                                   <input type=
"number" class="form-control" value="0" name="itemDetailsQuantity" id="itemDetailsQuantity">
92                                 </div>
93                                 <div
class="form-group col-md-3">
94                                   <label
for="itemDetailsUnitPrice">Unit Price<span class="requiredIcon">*</span></label>
95                                   <input type=
"text" class="form-control" value="0" name="itemDetailsUnitPrice" id="itemDetailsUnitPrice">
96                                 </div>
97                                 <div
class="form-group col-md-3">
98                                   <label
for="itemDetailsTotalStock">Total Stock</label>
99                                   <input type=
"text" class="form-control" name="itemDetailsTotalStock" id="itemDetailsTotalStock" readonly>
100                                 </div>
101                                 <div
class="form-group col-md-3">
102                                     <div id=
"imageContainer"></div>
103                                 </div>
104                               </div>
105                               <button type=
"button" id="addItem" class="btn btn-success">Add Item</button>
106                               <button type=
"button" id="updateItemDetailsButton" class="btn btn-primary">Update</button>
107                               <button type=
"button" id="deleteItem" class="btn btn-danger">Delete</button>
108                               <button type=
"reset" class="btn" id="itemClear">Clear</button>
109                             </form>
110                         </div>
111                         <div id=
"itemImageTab" class="container-fluid tab-pane fade">
112                             <br>
113                             <div id=
"itemImageMessage"></div>
114                             <p>You can upload an image
for a particular item using this section.</p>
115                             <p>Please make sure the item
is already added to database before uploading the image.</p>
116                             <br>
117                             <form name=
"imageForm" id="imageForm" method="post">
118                               <div
class="form-row">
119                                 <div
class="form-group col-md-3" style="display:inline-block">
120                                   <label
for="itemImageItemNumber">Item Number<span class="requiredIcon">*</span></label>
121                                   <input type=
"text" class="form-control" name="itemImageItemNumber" id="itemImageItemNumber" autocomplete="off">
122                                   <div id=
"itemImageItemNumberSuggestionsDiv" class="customListDivWidth"></div>
123                                 </div>
124                                 <div
class="form-group col-md-4">
125                                     <label
for="itemImageItemName">Item Name</label>
126                                     <input type=
"text" class="form-control" name="itemImageItemName" id="itemImageItemName" readonly>
127                                 </div>
128                               </div>
129                               <br>
130                               <div
class="form-row">
131                                   <div
class="form-group col-md-7">
132                                     <label
for="itemImageFile">Select Image ( <span class="blueText">jpg</span>, <span class="blueText">jpeg</span>, <span class="blueText">gif</span>, <span class="blueText">png</span> only )</label>
133                                     <input type=
"file" class="form-control-file btn btn-dark" id="itemImageFile" name="itemImageFile">
134                                   </div>
135                               </div>
136                               <br>
137                               <button type=
"button" id="updateImageButton" class="btn btn-primary">Upload Image</button>
138                               <button type=
"button" id="deleteImageButton" class="btn btn-danger">Delete Image</button>
139                               <button type=
"reset" class="btn">Clear</button>
140                             </form>
141                         </div>
142                     </div>
143                   </div>
144                 </div>
145               </div>
146               <div
class="tab-pane fade" id="v-pills-purchase" role="tabpanel" aria-labelledby="v-pills-purchase-tab">
147                 <div
class="card card-outline-secondary my-4">
148                   <div
class="card-header">Purchase Details</div>
149                   <div
class="card-body">
150                     <div id=
"purchaseDetailsMessage"></div>
151                     <form>
152                       <div
class="form-row">
153                         <div
class="form-group col-md-3">
154                           <label
for="purchaseDetailsItemNumber">Item Number<span class="requiredIcon">*</span></label>
155                           <input type=
"text" class="form-control" id="purchaseDetailsItemNumber" name="purchaseDetailsItemNumber" autocomplete="off">
156                           <div id=
"purchaseDetailsItemNumberSuggestionsDiv" class="customListDivWidth"></div>
157                         </div>
158                         <div
class="form-group col-md-3">
159                           <label
for="purchaseDetailsPurchaseDate">Purchase Date<span class="requiredIcon">*</span></label>
160                           <input type=
"text" class="form-control datepicker" id="purchaseDetailsPurchaseDate" name="purchaseDetailsPurchaseDate" readonly value="2018-05-24">
161                         </div>
162                         <div
class="form-group col-md-2">
163                           <label
for="purchaseDetailsPurchaseID">Purchase ID</label>
164                           <input type=
"text" class="form-control invTooltip" id="purchaseDetailsPurchaseID" name="purchaseDetailsPurchaseID" title="This will be auto-generated when you add a new record" autocomplete="off">
165                           <div id=
"purchaseDetailsPurchaseIDSuggestionsDiv" class="customListDivWidth"></div>
166                         </div>
167                       </div>
168                       <div
class="form-row">
169                           <div
class="form-group col-md-4">
170                             <label
for="purchaseDetailsItemName">Item Name<span class="requiredIcon">*</span></label>
171                             <input type=
"text" class="form-control invTooltip" id="purchaseDetailsItemName" name="purchaseDetailsItemName" readonly title="This will be auto-filled when you enter the item number above">
172                           </div>
173                           <div
class="form-group col-md-2">
174                               <label
for="purchaseDetailsCurrentStock">Current Stock</label>
175                               <input type=
"text" class="form-control" id="purchaseDetailsCurrentStock" name="purchaseDetailsCurrentStock" readonly>
176                           </div>
177                           <div
class="form-group col-md-4">
178                             <label
for="purchaseDetailsVendorName">Vendor Name<span class="requiredIcon">*</span></label>
179                             <
select id="purchaseDetailsVendorName" name="purchaseDetailsVendorName" class="form-control chosenSelect">
180                                 <?php
181                                     require(
'model/vendor/getVendorNames.php');
182                                 ?>
183                             </
select>
184                           </div>
185                       </div>
186                       <div
class="form-row">
187                         <div
class="form-group col-md-2">
188                           <label
for="purchaseDetailsQuantity">Quantity<span class="requiredIcon">*</span></label>
189                           <input type=
"number" class="form-control" id="purchaseDetailsQuantity" name="purchaseDetailsQuantity" value="0">
190                         </div>
191                         <div
class="form-group col-md-2">
192                           <label
for="purchaseDetailsUnitPrice">Unit Price<span class="requiredIcon">*</span></label>
193                           <input type=
"text" class="form-control" id="purchaseDetailsUnitPrice" name="purchaseDetailsUnitPrice" value="0">
194                           
195                         </div>
196                         <div
class="form-group col-md-2">
197                           <label
for="purchaseDetailsTotal">Total Cost</label>
198                           <input type=
"text" class="form-control" id="purchaseDetailsTotal" name="purchaseDetailsTotal" readonly>
199                         </div>
200                       </div>
201                       <button type=
"button" id="addPurchase" class="btn btn-success">Add Purchase</button>
202                       <button type=
"button" id="updatePurchaseDetailsButton" class="btn btn-primary">Update</button>
203                       <button type=
"reset" class="btn">Clear</button>
204                     </form>
205                   </div>
206                 </div>
207               </div>
208               
209               <div
class="tab-pane fade" id="v-pills-vendor" role="tabpanel" aria-labelledby="v-pills-vendor-tab">
210                 <div
class="card card-outline-secondary my-4">
211                   <div
class="card-header">Vendor Details</div>
212                   <div
class="card-body">
213                   <!-- Div to show the ajax message
from validations/db submission -->
214                   <div id=
"vendorDetailsMessage"></div>
215                      <form>
216                       <div
class="form-row">
217                         <div
class="form-group col-md-6">
218                           <label
for="vendorDetailsVendorFullName">Full Name<span class="requiredIcon">*</span></label>
219                           <input type=
"text" class="form-control" id="vendorDetailsVendorFullName" name="vendorDetailsVendorFullName" placeholder="">
220                         </div>
221                         <div
class="form-group col-md-2">
222                             <label
for="vendorDetailsStatus">Status</label>
223                             <
select id="vendorDetailsStatus" name="vendorDetailsStatus" class="form-control chosenSelect">
224                                 <?php include(
'inc/statusList.html'); ?>
225                             </
select>
226                         </div>
227                          <div
class="form-group col-md-3">
228                             <label
for="vendorDetailsVendorID">Vendor ID</label>
229                             <input type=
"text" class="form-control invTooltip" id="vendorDetailsVendorID" name="vendorDetailsVendorID" title="This will be auto-generated when you add a new vendor" autocomplete="off">
230                             <div id=
"vendorDetailsVendorIDSuggestionsDiv" class="customListDivWidth"></div>
231                         </div>
232                       </div>
233                       <div
class="form-row">
234                           <div
class="form-group col-md-3">
235                             <label
for="vendorDetailsVendorMobile">Phone (mobile)<span class="requiredIcon">*</span></label>
236                             <input type=
"text" class="form-control invTooltip" id="vendorDetailsVendorMobile" name="vendorDetailsVendorMobile" title="Do not enter leading 0">
237                           </div>
238                           <div
class="form-group col-md-3">
239                             <label
for="vendorDetailsVendorPhone2">Phone 2</label>
240                             <input type=
"text" class="form-control invTooltip" id="vendorDetailsVendorPhone2" name="vendorDetailsVendorPhone2" title="Do not enter leading 0">
241                           </div>
242                           <div
class="form-group col-md-6">
243                             <label
for="vendorDetailsVendorEmail">Email</label>
244                             <input type=
"email" class="form-control" id="vendorDetailsVendorEmail" name="vendorDetailsVendorEmail">
245                         </div>
246                       </div>
247                       <div
class="form-group">
248                         <label
for="vendorDetailsVendorAddress">Address<span class="requiredIcon">*</span></label>
249                         <input type=
"text" class="form-control" id="vendorDetailsVendorAddress" name="vendorDetailsVendorAddress">
250                       </div>
251                       <div
class="form-group">
252                         <label
for="vendorDetailsVendorAddress2">Address 2</label>
253                         <input type=
"text" class="form-control" id="vendorDetailsVendorAddress2" name="vendorDetailsVendorAddress2">
254                       </div>
255                       <div
class="form-row">
256                         <div
class="form-group col-md-6">
257                           <label
for="vendorDetailsVendorCity">City</label>
258                           <input type=
"text" class="form-control" id="vendorDetailsVendorCity" name="vendorDetailsVendorCity">
259                         </div>
260                         <div
class="form-group col-md-4">
261                           <label
for="vendorDetailsVendorDistrict">District</label>
262                           <
select id="vendorDetailsVendorDistrict" name="vendorDetailsVendorDistrict" class="form-control chosenSelect">
263                             <?php include(
'inc/districtList.html'); ?>
264                           </
select>
265                         </div>
266                       </div>
267                       <button type=
"button" id="addVendor" name="addVendor" class="btn btn-success">Add Vendor</button>
268                       <button type=
"button" id="updateVendorDetailsButton" class="btn btn-primary">Update</button>
269                       <button type=
"button" id="deleteVendorButton" class="btn btn-danger">Delete</button>
270                       <button type=
"reset" class="btn">Clear</button>
271                      </form>
272                   </div>
273                 </div>
274               </div>
275                 
276               <div
class="tab-pane fade" id="v-pills-sale" role="tabpanel" aria-labelledby="v-pills-sale-tab">
277                 <div
class="card card-outline-secondary my-4">
278                   <div
class="card-header">Sale Details</div>
279                   <div
class="card-body">
280                     <div id=
"saleDetailsMessage"></div>
281                     <form>
282                       <div
class="form-row">
283                         <div
class="form-group col-md-3">
284                           <label
for="saleDetailsItemNumber">Item Number<span class="requiredIcon">*</span></label>
285                           <input type=
"text" class="form-control" id="saleDetailsItemNumber" name="saleDetailsItemNumber" autocomplete="off">
286                           <div id=
"saleDetailsItemNumberSuggestionsDiv" class="customListDivWidth"></div>
287                         </div>
288                         <div
class="form-group col-md-3">
289                             <label
for="saleDetailsCustomerID">Customer ID<span class="requiredIcon">*</span></label>
290                             <input type=
"text" class="form-control" id="saleDetailsCustomerID" name="saleDetailsCustomerID" autocomplete="off">
291                             <div id=
"saleDetailsCustomerIDSuggestionsDiv" class="customListDivWidth"></div>
292                         </div>
293                         <div
class="form-group col-md-4">
294                           <label
for="saleDetailsCustomerName">Customer Name</label>
295                           <input type=
"text" class="form-control" id="saleDetailsCustomerName" name="saleDetailsCustomerName" readonly>
296                         </div>
297                         <div
class="form-group col-md-2">
298                           <label
for="saleDetailsSaleID">Sale ID</label>
299                           <input type=
"text" class="form-control invTooltip" id="saleDetailsSaleID" name="saleDetailsSaleID" title="This will be auto-generated when you add a new record" autocomplete="off">
300                           <div id=
"saleDetailsSaleIDSuggestionsDiv" class="customListDivWidth"></div>
301                         </div>
302                       </div>
303                       <div
class="form-row">
304                           <div
class="form-group col-md-5">
305                             <label
for="saleDetailsItemName">Item Name</label>
306                             <!--<
select id="saleDetailsItemNames" name="saleDetailsItemNames" class="form-control chosenSelect"> -->
307                                 <?php
308                                     
//require('model/item/getItemDetails.php');
309                                 ?>
310                             <!-- </
select> -->
311                             <input type=
"text" class="form-control invTooltip" id="saleDetailsItemName" name="saleDetailsItemName" readonly title="This will be auto-filled when you enter the item number above">
312                           </div>
313                           <div
class="form-group col-md-3">
314                               <label
for="saleDetailsSaleDate">Sale Date<span class="requiredIcon">*</span></label>
315                               <input type=
"text" class="form-control datepicker" id="saleDetailsSaleDate" value="2018-05-24" name="saleDetailsSaleDate" readonly>
316                           </div>
317                       </div>
318                       <div
class="form-row">
319                         <div
class="form-group col-md-2">
320                                   <label
for="saleDetailsTotalStock">Total Stock</label>
321                                   <input type=
"text" class="form-control" name="saleDetailsTotalStock" id="saleDetailsTotalStock" readonly>
322                                 </div>
323                         <div
class="form-group col-md-2">
324                           <label
for="saleDetailsDiscount">Discount %</label>
325                           <input type=
"text" class="form-control" id="saleDetailsDiscount" name="saleDetailsDiscount" value="0">
326                         </div>
327                         <div
class="form-group col-md-2">
328                           <label
for="saleDetailsQuantity">Quantity<span class="requiredIcon">*</span></label>
329                           <input type=
"number" class="form-control" id="saleDetailsQuantity" name="saleDetailsQuantity" value="0">
330                         </div>
331                         <div
class="form-group col-md-2">
332                           <label
for="saleDetailsUnitPrice">Unit Price<span class="requiredIcon">*</span></label>
333                           <input type=
"text" class="form-control" id="saleDetailsUnitPrice" name="saleDetailsUnitPrice" value="0">
334                         </div>
335                         <div
class="form-group col-md-3">
336                           <label
for="saleDetailsTotal">Total</label>
337                           <input type=
"text" class="form-control" id="saleDetailsTotal" name="saleDetailsTotal">
338                         </div>
339                       </div>
340                       <div
class="form-row">
341                           <div
class="form-group col-md-3">
342                             <div id=
"saleDetailsImageContainer"></div>
343                           </div>
344                      </div>
345                       <button type=
"button" id="addSaleButton" class="btn btn-success">Add Sale</button>
346                       <button type=
"button" id="updateSaleDetailsButton" class="btn btn-primary">Update</button>
347                       <button type=
"reset" id="saleClear" class="btn">Clear</button>
348                     </form>
349                   </div>
350                 </div>
351               </div>
352               <div
class="tab-pane fade" id="v-pills-customer" role="tabpanel" aria-labelledby="v-pills-customer-tab">
353                 <div
class="card card-outline-secondary my-4">
354                   <div
class="card-header">Customer Details</div>
355                   <div
class="card-body">
356                   <!-- Div to show the ajax message
from validations/db submission -->
357                   <div id=
"customerDetailsMessage"></div>
358                      <form>
359                       <div
class="form-row">
360                         <div
class="form-group col-md-6">
361                           <label
for="customerDetailsCustomerFullName">Full Name<span class="requiredIcon">*</span></label>
362                           <input type=
"text" class="form-control" id="customerDetailsCustomerFullName" name="customerDetailsCustomerFullName">
363                         </div>
364                         <div
class="form-group col-md-2">
365                             <label
for="customerDetailsStatus">Status</label>
366                             <
select id="customerDetailsStatus" name="customerDetailsStatus" class="form-control chosenSelect">
367                                 <?php include(
'inc/statusList.html'); ?>
368                             </
select>
369                         </div>
370                          <div
class="form-group col-md-3">
371                             <label
for="customerDetailsCustomerID">Customer ID</label>
372                             <input type=
"text" class="form-control invTooltip" id="customerDetailsCustomerID" name="customerDetailsCustomerID" title="This will be auto-generated when you add a new customer" autocomplete="off">
373                             <div id=
"customerDetailsCustomerIDSuggestionsDiv" class="customListDivWidth"></div>
374                         </div>
375                       </div>
376                       <div
class="form-row">
377                           <div
class="form-group col-md-3">
378                             <label
for="customerDetailsCustomerMobile">Phone (mobile)<span class="requiredIcon">*</span></label>
379                             <input type=
"text" class="form-control invTooltip" id="customerDetailsCustomerMobile" name="customerDetailsCustomerMobile" title="Do not enter leading 0">
380                           </div>
381                           <div
class="form-group col-md-3">
382                             <label
for="customerDetailsCustomerPhone2">Phone 2</label>
383                             <input type=
"text" class="form-control invTooltip" id="customerDetailsCustomerPhone2" name="customerDetailsCustomerPhone2" title="Do not enter leading 0">
384                           </div>
385                           <div
class="form-group col-md-6">
386                             <label
for="customerDetailsCustomerEmail">Email</label>
387                             <input type=
"email" class="form-control" id="customerDetailsCustomerEmail" name="customerDetailsCustomerEmail">
388                         </div>
389                       </div>
390                       <div
class="form-group">
391                         <label
for="customerDetailsCustomerAddress">Address<span class="requiredIcon">*</span></label>
392                         <input type=
"text" class="form-control" id="customerDetailsCustomerAddress" name="customerDetailsCustomerAddress">
393                       </div>
394                       <div
class="form-group">
395                         <label
for="customerDetailsCustomerAddress2">Address 2</label>
396                         <input type=
"text" class="form-control" id="customerDetailsCustomerAddress2" name="customerDetailsCustomerAddress2">
397                       </div>
398                       <div
class="form-row">
399                         <div
class="form-group col-md-6">
400                           <label
for="customerDetailsCustomerCity">City</label>
401                           <input type=
"text" class="form-control" id="customerDetailsCustomerCity" name="customerDetailsCustomerCity">
402                         </div>
403                         <div
class="form-group col-md-4">
404                           <label
for="customerDetailsCustomerDistrict">District</label>
405                           <
select id="customerDetailsCustomerDistrict" name="customerDetailsCustomerDistrict" class="form-control chosenSelect">
406                             <?php include(
'inc/districtList.html'); ?>
407                           </
select>
408                         </div>
409                       </div>
410                       <button type=
"button" id="addCustomer" name="addCustomer" class="btn btn-success">Add Customer</button>
411                       <button type=
"button" id="updateCustomerDetailsButton" class="btn btn-primary">Update</button>
412                       <button type=
"button" id="deleteCustomerButton" class="btn btn-danger">Delete</button>
413                       <button type=
"reset" class="btn">Clear</button>
414                      </form>
415                   </div>
416                 </div>
417               </div>
418               
419               <div
class="tab-pane fade" id="v-pills-search" role="tabpanel" aria-labelledby="v-pills-search-tab">
420                 <div
class="card card-outline-secondary my-4">
421                   <div
class="card-header">Search Inventory<button id="searchTablesRefresh" name="searchTablesRefresh" class="btn btn-warning float-right btn-sm">Refresh</button></div>
422                   <div
class="card-body">
423                     <ul
class="nav nav-tabs" role="tablist">
424                         <li
class="nav-item">
425                             <a
class="nav-link active" data-toggle="tab" href="#itemSearchTab">Item</a>
426                         </li>
427                         <li
class="nav-item">
428                             <a
class="nav-link" data-toggle="tab" href="#customerSearchTab">Customer</a>
429                         </li>
430                         <li
class="nav-item">
431                             <a
class="nav-link" data-toggle="tab" href="#saleSearchTab">Sale</a>
432                         </li>
433                         <li
class="nav-item">
434                             <a
class="nav-link" data-toggle="tab" href="#purchaseSearchTab">Purchase</a>
435                         </li>
436                         <li
class="nav-item">
437                             <a
class="nav-link" data-toggle="tab" href="#vendorSearchTab">Vendor</a>
438                         </li>
439                     </ul>
440   
441                     <!-- Tab panes -->
442                     <div
class="tab-content">
443                         <div id=
"itemSearchTab" class="container-fluid tab-pane active">
444                           <br>
445                           <p>Use the grid below to search all details of items</p>
446                           <!-- <a href=
"#" class="itemDetailsHover" data-toggle="popover" id="10">wwwee</a> -->
447                             <div
class="table-responsive" id="itemDetailsTableDiv"></div>
448                         </div>
449                         <div id=
"customerSearchTab" class="container-fluid tab-pane fade">
450                           <br>
451                           <p>Use the grid below to search all details of customers</p>
452                             <div
class="table-responsive" id="customerDetailsTableDiv"></div>
453                         </div>
454                         <div id=
"saleSearchTab" class="container-fluid tab-pane fade">
455                             <br>
456                             <p>Use the grid below to search sale details</p>
457                             <div
class="table-responsive" id="saleDetailsTableDiv"></div>
458                         </div>
459                         <div id=
"purchaseSearchTab" class="container-fluid tab-pane fade">
460                             <br>
461                             <p>Use the grid below to search purchase details</p>
462                             <div
class="table-responsive" id="purchaseDetailsTableDiv"></div>
463                         </div>
464                         <div id=
"vendorSearchTab" class="container-fluid tab-pane fade">
465                             <br>
466                             <p>Use the grid below to search vendor details</p>
467                             <div
class="table-responsive" id="vendorDetailsTableDiv"></div>
468                         </div>
469                     </div>
470                   </div>
471                 </div>
472               </div>
473               
474               <div
class="tab-pane fade" id="v-pills-reports" role="tabpanel" aria-labelledby="v-pills-reports-tab">
475                 <div
class="card card-outline-secondary my-4">
476                   <div
class="card-header">Reports<button id="reportsTablesRefresh" name="reportsTablesRefresh" class="btn btn-warning float-right btn-sm">Refresh</button></div>
477                   <div
class="card-body">
478                     <ul
class="nav nav-tabs" role="tablist">
479                         <li
class="nav-item">
480                             <a
class="nav-link active" data-toggle="tab" href="#itemReportsTab">Item</a>
481                         </li>
482                         <li
class="nav-item">
483                             <a
class="nav-link" data-toggle="tab" href="#customerReportsTab">Customer</a>
484                         </li>
485                         <li
class="nav-item">
486                             <a
class="nav-link" data-toggle="tab" href="#saleReportsTab">Sale</a>
487                         </li>
488                         <li
class="nav-item">
489                             <a
class="nav-link" data-toggle="tab" href="#purchaseReportsTab">Purchase</a>
490                         </li>
491                         <li
class="nav-item">
492                             <a
class="nav-link" data-toggle="tab" href="#vendorReportsTab">Vendor</a>
493                         </li>
494                     </ul>
495   
496                     <!-- Tab panes
for reports sections -->
497                     <div
class="tab-content">
498                         <div id=
"itemReportsTab" class="container-fluid tab-pane active">
499                             <br>
500                             <p>Use the grid below to
get reports for items</p>
501                             <div
class="table-responsive" id="itemReportsTableDiv"></div>
502                         </div>
503                         <div id=
"customerReportsTab" class="container-fluid tab-pane fade">
504                             <br>
505                             <p>Use the grid below to
get reports for customers</p>
506                             <div
class="table-responsive" id="customerReportsTableDiv"></div>
507                         </div>
508                         <div id=
"saleReportsTab" class="container-fluid tab-pane fade">
509                             <br>
510                             <!-- <p>Use the grid below to
get reports for sales</p> -->
511                             <form>
512                               <div
class="form-row">
513                                   <div
class="form-group col-md-3">
514                                     <label
for="saleReportStartDate">Start Date</label>
515                                     <input type=
"text" class="form-control datepicker" id="saleReportStartDate" value="2018-05-24" name="saleReportStartDate" readonly>
516                                   </div>
517                                   <div
class="form-group col-md-3">
518                                     <label
for="saleReportEndDate">End Date</label>
519                                     <input type=
"text" class="form-control datepicker" id="saleReportEndDate" value="2018-05-24" name="saleReportEndDate" readonly>
520                                   </div>
521                               </div>
522                               <button type=
"button" id="showSaleReport" class="btn btn-dark">Show Report</button>
523                               <button type=
"reset" id="saleFilterClear" class="btn">Clear</button>
524                             </form>
525                             <br><br>
526                             <div
class="table-responsive" id="saleReportsTableDiv"></div>
527                         </div>
528                         <div id=
"purchaseReportsTab" class="container-fluid tab-pane fade">
529                             <br>
530                             <!-- <p>Use the grid below to
get reports for purchases</p> -->
531                             <form>
532                               <div
class="form-row">
533                                   <div
class="form-group col-md-3">
534                                     <label
for="purchaseReportStartDate">Start Date</label>
535                                     <input type=
"text" class="form-control datepicker" id="purchaseReportStartDate" value="2018-05-24" name="purchaseReportStartDate" readonly>
536                                   </div>
537                                   <div
class="form-group col-md-3">
538                                     <label
for="purchaseReportEndDate">End Date</label>
539                                     <input type=
"text" class="form-control datepicker" id="purchaseReportEndDate" value="2018-05-24" name="purchaseReportEndDate" readonly>
540                                   </div>
541                               </div>
542                               <button type=
"button" id="showPurchaseReport" class="btn btn-dark">Show Report</button>
543                               <button type=
"reset" id="purchaseFilterClear" class="btn">Clear</button>
544                             </form>
545                             <br><br>
546                             <div
class="table-responsive" id="purchaseReportsTableDiv"></div>
547                         </div>
548                         <div id=
"vendorReportsTab" class="container-fluid tab-pane fade">
549                             <br>
550                             <p>Use the grid below to
get reports for vendors</p>
551                             <div
class="table-responsive" id="vendorReportsTableDiv"></div>
552                         </div>
553                     </div>
554                   </div>
555                 </div>
556               </div>
557             </div>
558          </div>
559       </div>
560     </div>
561 <?php
562     require
'inc/footer.php';
563 ?>
564   </body>
565 </html>


Gõ tìm kiếm nhanh...